import request from '@/utils/request'

// 查询变更历史列表
export function listHhqyChangeHistory(query) {
  return request({
    url: '/changehistory/hhqyChangeHistory/list',
    method: 'get',
    params: query
  })
}

// 查询变更历史详细
export function getHhqyChangeHistory(id) {
  return request({
    url: '/changehistory/hhqyChangeHistory/' + id,
    method: 'get'
  })
}

// 保存变更历史
export function saveHhqyChangeHistory(data) {
  return request({
    url: '/changehistory/hhqyChangeHistory/save',
    method: 'post',
    data: data
  })
}

// 删除变更历史
export function delHhqyChangeHistory(id) {
  return request({
    url: '/changehistory/hhqyChangeHistory/' + id,
    method: 'delete'
  })
}

// 导出变更历史
export function exportHhqyChangeHistory(query) {
  return request({
    url: '/changehistory/hhqyChangeHistory/export',
    method: 'get',
    params: query
  })
}

// 获取变更股东信息最新的一条
export function getLastChangeShareHolder(hhqyId) {
  return request({
    url: '/changehistory/hhqyChangeHistory/getLastChangeShareHolder/' + hhqyId,
    method: 'get'
  })
}

// 查询下属合伙企业信息
export function findSubHhqyByHhqyId(query) {
  return request({
    url: '/changehistory/hhqyChangeHistory/findSubHhqyByHhqyId/' + query.hhqyId,
    method: 'get',
    params: query
  })
}
